projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b7c0f5
)
sh: Add support showing KByte of flash memory size
author
Nobuhiro Iwamatsu
<
[email protected]
>
Tue, 26 Oct 2010 11:23:53 +0000
(20:23 +0900)
committer
Nobuhiro Iwamatsu
<
[email protected]
>
Tue, 11 Jan 2011 12:03:25 +0000
(21:03 +0900)
Signed-off-by: Nobuhiro Iwamatsu <
[email protected]
>
arch/sh/lib/board.c
patch
|
blob
|
history
diff --git
a/arch/sh/lib/board.c
b/arch/sh/lib/board.c
index 3d201b2e5c03f4b624e5b69c9b4abc585a994d8a..cdac3826c76e20698e49c1dcd041fb0599236b0e 100644
(file)
--- a/
arch/sh/lib/board.c
+++ b/
arch/sh/lib/board.c
@@
-1,5
+1,5
@@
/*
- * Copyright (C) 2007,
2008
+ * Copyright (C) 2007,
2008, 2010
* Nobuhiro Iwamatsu <
[email protected]
>
*
* This program is free software; you can redistribute it and/or
@@
-46,7
+46,11
@@
unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN;
static int sh_flash_init(void)
{
gd->bd->bi_flashsize = flash_init();
- printf("FLASH: %ldMB\n", gd->bd->bi_flashsize / (1024*1024));
+
+ if (gd->bd->bi_flashsize >= (1024 * 1024))
+ printf("FLASH: %ldMB\n", gd->bd->bi_flashsize / (1024*1024));
+ else
+ printf("FLASH: %ldKB\n", gd->bd->bi_flashsize / 1024);
return 0;
}